# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thomas Weißschuh <thomas t-8ch de>
# Contributor: Nathan Owe <ndowens.aur at gmail dot com>

pkgname=batctl
pkgver=2023.0
_advver=$pkgver
pkgrel=1
pkgdesc='B.A.T.M.A.N. advanced control and management tool'
arch=('loong64' 'x86_64')
url='http://www.open-mesh.net/'
license=('GPL')
depends=('libnl')
source=("http://downloads.open-mesh.net/batman/releases/batman-adv-$_advver/batctl-$pkgver.tar.gz"{,.asc})
sha512sums=('dc403750512bb9473632432fc93fd4b4adc4b557b7ccd161ae05d6214ad7681483e9ea0ae7ec7683cc4e44bc0216a41102c2b68dd9bed56f2dc937ec7fb387d6'
            'SKIP')
validpgpkeys=('2DE9541A85CC87D5D9836D5E0C8A47A2ABD72DF9')  # Simon Wunderlich

build(){
  cd batctl-$pkgver
  make
}

package() {
  cd batctl-$pkgver
  make DESTDIR="$pkgdir" PREFIX=/usr SBINDIR=/usr/bin install
}
